fix to work with new disjoint forest implementation