Fixes crashes when no network available