fix bugs in segment.go