Chargen: Minor Bugfix on add_edge