Fixing crash when the command is not recognised