Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 12370)
+++ trunk/ippTasks/detrend.stack.pro	(revision 12371)
@@ -150,5 +150,5 @@
     $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS
     if ("$WORKDIR" != "NULL")
-      $run = $run --workdir $outroot
+      $run = $run --workdir $WORKDIR
     end
 
