Fixing API interaction