Fixed issue with API key not being set