better cli, fix bugs for the case of only one node