Fixed a bug in network type negotiation causing an infinite loop