diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -22,19 +22,21 @@ module.exports = function(knex, options) {
 
     var queries = [];
     var watchQuery = function(query) {
-      var start = process.hrtime();
-      query.on('end', function() {
-        var diff = process.hrtime(start);
-        var ms = diff[0] * 1e3 + diff[1] * 1e-6;
-        query.duration = ms.toFixed(3);
-        queries.push(query);
-      });
+      query._startTime = process.hrtime();
+    };
+
+    var recordQuery = function(query) {
+      var diff = process.hrtime(query._startTime);
+      var ms = diff[0] * 1e3 + diff[1] * 1e-6;
+      query.duration = ms.toFixed(3);
+      queries.push(query);
     };
 
     var logQuery = colored(function() {
       res.removeListener('finish', logQuery);
       res.removeListener('close', logQuery);
       knex.client.removeListener('query', watchQuery);
+      knex.client.removeListener('end', recordQuery);
 
       queries.forEach(function(query) {
         var color = chalk.gray;
@@ -47,6 +49,7 @@ module.exports = function(knex, options) {
     });
 
     knex.client.on('query', watchQuery);
+    knex.client.on('end', recordQuery);
     res.on('finish', logQuery);
     res.on('close', logQuery);
More changes related to what could be incorporated into Knex.