Added cancellation support