Corrected image orientation problem