fix record index error