Fix for flipped images