Fix several netcode issues (2)