Added support for cyclic cases, disconnected subset.