Fixed task cancel mistake.