fixed duplicate edge addition to graph