Fixing issues with headers and apiKey