fix bug preventing cancelling out of repeated commands
Merge pull request #355 from fizzix/restruct-bugfix

fix bug preventing cancelling out of repeated commands