fixed image flipping