Fixed bug where there is an error when deleting commands.