Fixed the image segmentation