Fixing mobile device orientation issues