changes to fix refresh issues