fixed missing edges bug