exit when falling out of the loop so that parent dies too

also make the loop more visible in the loop