fix error in api