some fixes to networking module