Fixed bug in edge vertex generation.