Fix issue with api command