fixed segfault on no network connection