fix refresh algorithm error