Minor fixes in the api coding