Fixing the image orientations