Add cancel for tasks