fix cmdline tool bug