             type: "message"
             message: message
 
-        _.forEach @connections, (c) ->
-            c.send data
+        _.forEach @connections, (connection) ->
+            connection.send data
 
     listenForMessage: (connection) ->
         connection.on "data", (data) =>

                @setState peerIdForHost: peerIdForHost

                peer.on "connection", (connection) =>
                    @connections.push connection
                    @listenForMessage connection

                    connection.on "open", =>
                        @showAlertAboutNewConnection()

                        connectionsWithoutNewConnection = _.filter @connections, (c) -> c.peer != connection.peer
                        peerIdsWithoutNewConnection = @connectionsToPeerIds connectionsWithoutNewConnection

                        if peerIdsWithoutNewConnection.length
                            connection.send type: "newConnection", peerIds: peerIdsWithoutNewConnection

            if not isHost
                @setState peerIdForHost: peerIdForHost

        peerIdForHost: null
        messages: []

    componentWillMount: ->
        peerIdForHost = getSegments()[1]
        isHost = not peerIdForHost?
