Fixed a bug where if a valid edge was already in the graph it stopped checking for other edges.