     @pairingChannel.unsubscribe()
     @markerColour = @colours[@membersCount]
     @subscribeToPusher()
-    @listenForEvents()
+    @synchronizeColours()
 
   subscribeToPusher: ->
     @pusher = new Pusher @app_key,

      @sessionId = @joinView.miniEditor.getText()
      keys = @sessionId.split("-")
      [@app_key, @app_secret] = [keys[0], keys[1]]

      # takenColour = @colours[keys[3]]
      # @assignColour(takenColour)

      @joinPanel.hide()

      atom.workspace.open().then => @startPairing() #starts a new tab to join pairing session

    atom.views.getView(@editor).setAttribute('id', 'AtomPair')

    @subscribeToPusher()
    @synchronizeColours()


  synchronizeColours: ->
    @pairingChannel.bind 'pusher:subscription_succeeded', (members) =>
      @membersCount = members.count
      return @resubscribe() unless @markerColour
      colours = Object.keys(members.members)
      friendColours = _.without(colours, @markerColour)
      _.each(friendColours, (colour) => @addMarker 0, colour)
      @listenForEvents()

  listenForDestruction: ->
