fix rank_index for level0