some fixes in API