Minor fixes in API