Fix revert before first commit
Trim PathSegment