fix refresh problems