         gatheringDone = (stream) => (candidates) =>
           log stream.id + " gathering done"
           for candidate in candidates
-            @signaling.sendCandidate stream.id, stream.index, candidate + '\r\n'
+            @signaling.sendCandidate stream.mid, stream.index, candidate + '\r\n'
 
         nice_stream.on 'gatheringDone', gatheringDone stream
 


        rtp_types = rtp_types.concat(parseInt(type) for type in types.split(" "))

      else if m = line.match(/a=ice-ufrag:(.*)/)
        # replace and apply ufrag
        stream.ufrag = m[1]


        stream = {
          id: id
          mid: id
          index: index
          nice: nice_stream
          needs_ice_cred: true
        }

        @streams[index] = stream

        # send candidates when gathered
        # TODO: move to trickling ...
