fixing a bug with the API url