run command, and fix some issues