Fixed bug in network code.