fix registerCommand(main routine)