Defect in api implementation