fix error for api