Added handling for missing api keys