fixing crash on no connection error