fixed bug in CommandManager