fixed a bug with image rotation by uploads from mobile devices