Command is now closed after cancelling, improved marking command as closed, issue #64