Remove trailing slashes from primitives