Fix a NPE in the command system.