Fixed AttributeError:cmd bug