fix bug in del_edge