diff --git a/minivents.js b/minivents.js
index <HASH>..<HASH> 100644
--- a/minivents.js
+++ b/minivents.js
@@ -16,8 +16,7 @@ function Events(target){
      */
     target.off = function(type, func){
       list = events[type] || []
-      !func && (list.length = 0) 
-      i = list.length
+      i = func ? list.length : (list.length = 0);
       while(~--i<0) func == list[i].f && list.splice(i,1)
     }
     /**
optimized and made smaller 'off' method