Fixed a minor bug with generating the URL for API calls.