fix some bugs and rewrite run command