Index: trunk/ippScripts/scripts/phase0imfile.pl
===================================================================
--- trunk/ippScripts/scripts/phase0imfile.pl	(revision 8954)
+++ trunk/ippScripts/scripts/phase0imfile.pl	(revision 8983)
@@ -103,7 +103,12 @@
         $command .= " " . VARIABLES->{$variable} . " " . ($stats->data($variable))->{mean};
     }
-    
+
     $command .= " " . P0TOOL_BG_MEAN() . " " . $stats->bg_mean();
-    $command .= " " . P0TOOL_BG_STDEV() . " " . $stats->bg_stdev();
+    if (defined($stats->bg_stdev())) {
+	$command .= " " . P0TOOL_BG_STDEV() . " " . $stats->bg_stdev();
+    } else {
+	# Will not be defined if there is only a single imfile
+	$command .= " " . P0TOOL_BG_STDEV() . " 0";
+    }
     $command .= " " . P0TOOL_BG_MEAN_STDEV() . " " . $stats->bg_mean_stdev();
  
