fix api call