Add cancel method to Command.