diff --git a/src/EntityExportCsvBatch.php b/src/EntityExportCsvBatch.php
index e2bb255..fde6779 100644
--- a/src/EntityExportCsvBatch.php
+++ b/src/EntityExportCsvBatch.php
@@ -219,7 +219,7 @@ class EntityExportCsvBatch {
     );
     $batch++;
 
-    if ($batch != $iterations) {
+    if ($iterations != 0 && $batch != $iterations) {
       $context['finished'] = $batch / $iterations;
     }
 
