Fix the minimum spanning tree heuristik.