Fixed bug on PrimMST & method to prev -> graph