fix rank missing hist error