Minor fixes to the API