As you edit the elevation profile, keep in mind that after you finish the sketch, the wall top or bottom attaches only where horizontal lines are coincident with the reference planes in the sketch.
Sample edited profile in sketch mode (note top sketch lines that are coincident with reference planes)
Finished wall attached to roof (non-coincidental horizontal lines from sketch did not attach)