Fixed an NPE for commands.