Index: trunk/psLib/src/imageops/psImageBackground.c
===================================================================
--- trunk/psLib/src/imageops/psImageBackground.c	(revision 10396)
+++ trunk/psLib/src/imageops/psImageBackground.c	(revision 10550)
@@ -73,7 +73,6 @@
         if (!psVectorSort(values, values)) {
             psError(PS_ERR_UNKNOWN, false, "Unable to sort values.\n");
-            psFree(stats);
             psFree(values);
-            return NULL;
+            return false;
         }
 
@@ -91,18 +90,17 @@
     } else {
         // XXX leave this as a psphot user option (passed in as part of stats?)
-        if (stats->options & PS_STAT_FITTED_MEAN) {
+        if ((stats->options & PS_STAT_FITTED_MEAN) || (stats->options & PS_STAT_FITTED_MEAN_V2)) {
             stats->clipSigma = 1.0;
         }
-        if (psVectorStats (stats, values, NULL, NULL, 0) == NULL) {
+        if (!psVectorStats (stats, values, NULL, NULL, 0)) {
             psError(PS_ERR_UNKNOWN, false, "Unable to measure statistics for image background "
                     "(%dx%d, (row0,col0) = (%d,%d)",
                     image->numRows, image->numCols, image->row0, image->col0);
-            psFree(stats);
             psFree(values);
-            return NULL;
+            return false;
         }
     }
 
     psFree(values);
-    return stats;
+    return true;
 }
