Prevented crashing on loss of internet