added a check in organized_connected_component_segmentation