fix some codes for api features