Saving state in onPause since onDestroy might not be called