Fixed error in RemoveSegment
nothing changed