fix bug in AbstractEdge compareTo