Fixed bug in API key handling.