back button behaviour changes on state transition