Change network detection code.