fixed for pauseTask and resumeTask