When building the minimum spanning tree, make sure we start from a reachable node.