fix refresh idx bug