Updated NetworkManager.cs