improve back button behaviors