Fixed error with app crashing on going back to portrait mode from landscape.