fix bug preventing cancelling out of repeated commands