fixed crash if there is no internet connection