fix a refresh bug