fixed bugs with back button