fix issue with trailing slashes