fix left and right flip.