fix weighted union find