fix some migraph bug
Prim's algo OK