Fix api call tracking