fix for image orientation issues