Fix some command bugs.