fix rank mistake