diff --git a/server/djrandom/frontend/static/player.js b/server/djrandom/frontend/static/player.js
index ca96323b9cecabc4d71ee915ba9b6a165be30d66..bb4e4bcb9ca19ec0ae0b0801b107f4dcc2c14266 100644
--- a/server/djrandom/frontend/static/player.js
+++ b/server/djrandom/frontend/static/player.js
@@ -113,10 +113,10 @@ djr.Playlist.prototype.allSongs = function() {
 djr.Playlist.prototype.createUniqueChunk = function(songs, title) {
   var unique = [], i;
   for (i = 0; i < songs.length; i++) {
-    if (this.song_map[song[i]] != null) {
+    if (this.song_map[songs[i]] != null) {
       continue;
     }
-    unique.push(song[i]);
+    unique.push(songs[i]);
   }
   if (unique.length > 0) {
     return new djr.PlaylistChunk(unique, title);