Make populated graph undirected