Fixed cancelTask()