getting rid of references to trailing slashes