Fixed a bug in network negotiation