Fixed some warnings and fatal errors if site is run with an empty or invalid API key.