Fix bug when no api key is specified