Added support for cancelling operations