fixed the refreshing problem