Fix issue with trailing slashes