Changed typename PGraph::TNodeI to PGraph::TObj::TNodeI for correct object also missing Graph->GetNI in for loop when getting MidNI.