bug fix in segmenter code