Additional fixes in the command logic