diff --git a/lib/socket.js b/lib/socket.js
index <HASH>..<HASH> 100644
--- a/lib/socket.js
+++ b/lib/socket.js
@@ -250,13 +250,13 @@ Socket.prototype.ack = function(){
  */
 
 Socket.prototype.onack = function(packet){
-  var ack = this.acks[packet.id];
-  if (ack) {
+  var ack = this.acks[Number(packet.id)];
+  if ('function' == typeof ack) {
     debug('calling ack %s with %j', packet.id, packet.data);
     ack.apply(this, packet.data);
     delete this.acks[packet.id];
   } else {
-    debug('ack %s not found', packet.id);
+    debug('bad ack %s', packet.id);
   }
 };
socket: protect against `__proto__` deletion