Fix segmentation tool