Added check_edge_end.