API key test & bugfix