Improve API key check, fixes #3