Fixed bug with app crashing when going back