fix bug in method:getMinSpanTree()