Fix issue with error handling of commands.