 
         for commentEl in commentAreaEl.childNodes
           chat = chats[commentEl.dataset.index]
-          if chat.vpos / 100 < vpos - settings.commentPreTime
+          if chat.vpos / 100 < vpos - settings.commentPostTime
             removalPendingElements.push commentEl
           else
-            scrollTime = (vpos + settings.commentPostTime) - chat.vpos / 100
+            scrollTime = (vpos + settings.commentPreTime) - chat.vpos / 100
             commentWidth = commentEl.offsetWidth
             scrollPath = videoWidth + commentWidth
 

  comments = null

  player.ready ->
    player.play()

    # Request comment
    xhr = new XMLHttpRequest()
    xhr.overrideMimeType 'text/xml'

          layoutComment chat, index

      updateComment = ->
        vpos = player.currentTime()
        videoWidth = videoEl.offsetWidth

