Fixes to API