fixed ordering issue in get_inner_edges