fixes to cli script
fixes to cli script (really)