diff --git a/erizo_controller/erizoController/roomController.js b/erizo_controller/erizoController/roomController.js
index <HASH>..<HASH> 100644
--- a/erizo_controller/erizoController/roomController.js
+++ b/erizo_controller/erizoController/roomController.js
@@ -23,14 +23,14 @@ exports.RoomController = function (spec) {
 
     var amqper = spec.amqper;
 
-    var KEELALIVE_INTERVAL = 5*1000;
+    var KEEPALIVE_INTERVAL = 5*1000;
 
     var eventListeners = [];
 
     var callbackFor = function(erizo_id, publisher_id) {
         return function(ok) {
             if (ok !== true) {
-                dispatchEvent("unpublish", erizo_id);
+                dispatchEvent("unpublish", publisher_id);
                 amqper.callRpc("ErizoAgent", "deleteErizoJS", [erizo_id], {callback: function(){
                     delete erizos[publisher_id];
                 }});
@@ -45,7 +45,7 @@ exports.RoomController = function (spec) {
         }
     };
 
-    var keepAliveLoop = setInterval(sendKeepAlive, KEELALIVE_INTERVAL);
+    var keepAliveLoop = setInterval(sendKeepAlive, KEEPALIVE_INTERVAL);
 
     var createErizoJS = function(publisher_id, callback) {
     	amqper.callRpc("ErizoAgent", "createErizoJS", [publisher_id], {callback: function(erizo_id) {
Corrected keepalive variable name