Fixed command registration.
Merge pull request #2121 from cmfcmf/fixed-command-regitration

Fixed command registration.