Prevent loop occuring when API key is not set