Fixed another bug for duplicate nodes at creation of edges