fixed issues with refresh button and internet connection