Fix for regression that caused ClassCastException after joining multiplayer.