fixing issue with back button