Fixing refresh issue