fix npe onPause