Updated refresh button logic.