diff --git a/webform.install b/webform.install
index 333ef4b..811c8e3 100644
--- a/webform.install
+++ b/webform.install
@@ -1070,6 +1075,9 @@
         drupal_write_record('webform_emails', $email, array('nid', 'eid'));
       }
     }
+
+    // Update the last processed NID.
+    $sandbox['last_nid_processed'] = $nid;
   }
 
   // If less than limit was processed, the update process is finished.
@@ -1330,3 +1338,12 @@
     _webform_delete_file(NULL, array($fid));
   }
 }
