Fixed registering entity; now works in multiplayer