Bugs fixed in connect_edge.