-bug fixes and back button handling