Minor fixes to api