Fixing the api call