Fixing errors in Segment.