Corrects refresh logic error