Fix an issue with trailing slashes.