Small fixes to networking