fixed multiple edges issue