diff --git a/lib/models.js b/lib/models.js
index <HASH>..<HASH> 100644
--- a/lib/models.js
+++ b/lib/models.js
@@ -11,19 +11,20 @@ function init(sugar, engine) {
         post: Boolean
     });
     Middleware.pre(function() {
-        Middleware.use(function(data, next) {
-            sugar.update(Middleware, {
-                _id: data._id,
-                pre: true
-            }, function(err) {
+        Middleware.use(function(next) {
+            sugar.getAll(Middleware, {}, function(err, d) {
                 if(err) console.error(err);
 
-                next();
+                // TODO: set pre of each true. now setting just first
+                // TODO: implement batch update?
+
+                if(d[0]) sugar.update(Middleware, d[0]._id, {pre: true}, next);
+                else next();
             });
         });
     });
     Middleware.post(function() {
-        Middleware.use(function(data, next) {
+        Middleware.use(function(next, data) {
             sugar.update(Middleware, {
                 _id: data._id,
                 post: true
Pass data just to post middleware

Obviously this cannot be done in the case of pre given there is no data
available yet.