bugfixing in single_image_segmentation