fixed onPause crash