fix for image rotation