     initUser : (event, data) =>
         window.Voicious.currentUser = data
         @emitter.trigger 'module.initialize', { }
-        
+
     removePeer   : (peerId) =>
-        do @peers[peerId].close
+        console.log @peers[peerId]
+        do @peers[peerId].dc.close
+        if @peers[peerId].mc?
+            do @peers[peerId].mc.close
         @peers[peerId] = null
         delete @peers[peerId]
 

            if peer.name is username
                id = peer.id
                break
        id    

window.RTCSessionDescription = window.mozRTCSessionDescription or window.RTCSessionDescription
window.RTCIceCandidate       = window.mozRTCIceCandidate       or window.RTCIceCandidate

            message = { type : 'chat.message' , params : { message : data } }
        for id, peer of @peers
            @send id, message

    sendToOneName : (event, msg) =>
        message = { type : msg.type, params : msg.params }
        userId = @getIdFromUsername msg.to
