fixes issues with back button going to inital page