Fix union-find.