fix onpause problem, but power off has bugs