Fixing the pointer on MinimumWeightSpanningTree