fix crash when pause app