fixed bug related to when internet connection is regained