fix the network error handling.