Fix network state code