Fix of buggy aggregation of edges