fixed app crash when sleeped for a long time