Fix api call on server