fix SegmentTrajectory