Fixed crash if no network is available.