trying to fix the refresh problem