diff --git a/lib/db.js b/lib/db.js
index <HASH>..<HASH> 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -44,7 +44,7 @@ exports.db_setup = function(app, db, next) {
 		    if (typeof values != 'function')
 			_sql = app.db.format(sql, values);
 		    console.log('SQL query:', _sql);
-		    return _query(sql, values, callback);
+		    return _query.call(this, sql, values, callback);
 		};
 	    }
 	    next();
small fix to mysql interface