update back button behaviour.