iOS - crash fix when no network