Fixed naming bug when adj.matrix is converted to graph object during last stage.