Fixed bug with cancellation