Fixing crash when no internet is available [skip ci]