Fix back button bug