Fixed some problems with adding the api key as a parameter.