Bug in genEdges fixed