Fixing _unconnectedSegments generation.
merging