Fix issue with slashes at the end of URLs.