Added task cancellation.