fixed cmd is undef issue
0.4.5