fixed a few back button bugs

as you can tell, there are a lot of variables that determine state