Fixed a flaw in the network library. The returned string is now only as long as the number of received bytes, rather than the buffer length. This fixes a fault which occurred when using JSON.