Possible fix for refresh bug