     diffInterval = KD.config.collaboration.timeout
 
     if @amIHost
-      KD.utils.repeat pingInterval, => @pingTime.setText Date.now().toString()
+      @pingInterval = KD.utils.repeat pingInterval, =>
+        @pingTime.setText Date.now().toString()
     else
-      repeat = KD.utils.repeat pongInterval, =>
+      @pingInterval = KD.utils.repeat pongInterval, =>
         lastPing = @pingTime.getText()
 
         return  if Date.now() - lastPing < diffInterval

          if err
          then console.warn err
          else
            KD.utils.killRepeat repeat
            @stopCollaborationSession =>
              @quit()


      @chat.emit 'CollaborationEnded'
      @chat = null
      @modal.destroy()
      @rtm.dispose()
      @rtm = null
      KD.utils.killRepeat @pingInterval
      KD.singletons.mainView.activitySidebar.emit 'ReloadMessagesRequested'
      @forEachSubViewInIDEViews_ 'editor', (ep) => ep.removeAllCursorWidgets()

    @mySnapshot.clear()
    @rtm.deleteFile @getRealTimeFileName()
