diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py
index 1e52d82fe06594e578b49c50ea30813a0423310d..a40a93ca76d99a82618feff7106601edc3c7e37f 100644
--- a/scripts/port_from_sqlite_to_postgres.py
+++ b/scripts/port_from_sqlite_to_postgres.py
@@ -454,7 +454,7 @@ class Porter(object):
 
         total_count = remaining_count + inserted_rows
 
-        defer.returnValue((next_chunk, remaining_count, total_count))
+        defer.returnValue((next_chunk, inserted_rows, total_count))
 
     @defer.inlineCallbacks
     def _get_remaining_count_to_port(self, table, next_chunk):