Added check for preexisting segmentation