Improve cancellation support.