fixed the cli/api issue