prevent a crash when pressing the up button in the settings activity