Better refreshing logic