fix crash in Cmd.cs