Another bug fix
Changing the API for cli