fix printing bug for segment end positions