Fixing Krushkal's algorithm