fix bug: crash when the activity be killed at background.