Modify refresh logic