They can't fly upside down, the 2 wings make a forward and backward motion pushing down the air and so producing upward thrust. They throw them selves sort of straight up and grab the ceiling with the first 2 legs, then pull themselves completely upside down.