fixed the rotating while flipped