Setting totalPlayers correctly