Fix apiKey not getting assigned