many networking fixes