Network Client: Fix compile and runtime errors. All tests pass.