Fix network error connection checking