bug fixes and back button