Fix exception when no network available