Clean up segmentation