Index: trunk/ippScripts/scripts/detrend_resid.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid.pl	(revision 11492)
+++ trunk/ippScripts/scripts/detrend_resid.pl	(revision 11829)
@@ -189,5 +189,5 @@
     } else {
 	# May be undefined if there is only a single imfile
-	$command .= ' -bg_stdev 0';
+	$command .= ' -bg_mean_stdev 0';
     }
 
@@ -217,5 +217,5 @@
 
     warn($msg);
-    if ($det_id and $iter and $exp_tag) {
+    if ($det_id and $iter and $exp_tag and not $no_update) {
 	my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag -class_id $class_id -code $exit_code";
 	$command .= " -dbname $dbname" if defined $dbname;
