Fixes to networking