Index: trunk/ippTasks/detrend.correct.pro
===================================================================
--- trunk/ippTasks/detrend.correct.pro	(revision 18568)
+++ trunk/ippTasks/detrend.correct.pro	(revision 19465)
@@ -71,14 +71,16 @@
 
   task.exec
+    $run = dettool -tocorrectedimfile
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tocorrectedimfile -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingCorrectedImfile_DB
-      command dettool -tocorrectedimfile -limit 20 -dbname $DB:$detPendingCorrectedImfile_DB
+      $run = $run -dbname $DB:$detPendingCorrectedImfile_DB
       $detPendingCorrectedImfile_DB ++
       if ($detPendingCorrectedImfile_DB >= $DB:n) set detPendingCorrectedImfile_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
@@ -192,14 +194,16 @@
 
   task.exec
+    $run = dettool -tocorrectedexp
     if ($DB:n == 0)
       option DEFAULT
-      command dettool -tocorrectedexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$detPendingCorrectedExp_DB
-      command dettool -tocorrectedexp -limit 20 -dbname $DB:$detPendingCorrectedExp_DB
+      $run = $run -dbname $DB:$detPendingCorrectedExp_DB
       $detPendingCorrectedExp_DB ++
       if ($detPendingCorrectedExp_DB >= $DB:n) set detPendingCorrectedExp_DB = 0
     end
+    add_poll_args run
+    command $run
   end
 
