fixed app crash if not connected to internet