Fix the intersection bug.

When a road segment is snapped, it might cause intersection with other
existing edges. So I fixed this problem.