Reduce crash issue when network not connected