leader: fix error when load idx