Fixed javascript error for currentPlayer.