Now working reliably when no network is available