Fixing API error