Fix trace generation for edges.