Fix crash on no network present (fix #21)