Prevented duplicate edges being added