fixes to the api