API calls broken on server side