fixed the refreshing issue