Fix reference variable bug in player.js