Fixing error handling, allow basic.cancel to be called at any time.