Index: /trunk/psphot/src/psphotExtendedSourceAnalysis.c
===================================================================
--- /trunk/psphot/src/psphotExtendedSourceAnalysis.c	(revision 29026)
+++ /trunk/psphot/src/psphotExtendedSourceAnalysis.c	(revision 29027)
@@ -121,4 +121,6 @@
 	if (source->peak->y > AnalysisRegion.y1) continue;
 
+	// fprintf (stderr, "xsrc: %f, %f : %f\n", source->peak->xf, source->peak->yf, source->peak->SN); 
+
 	// replace object in image
 	if (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED) {
@@ -178,4 +180,6 @@
     }
 
+    // fprintf (stderr, "xsrc : tried %ld objects\n", sources->n);
+
     return true;
 }
Index: /trunk/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- /trunk/psphot/src/psphotExtendedSourceFits.c	(revision 29026)
+++ /trunk/psphot/src/psphotExtendedSourceFits.c	(revision 29027)
@@ -200,5 +200,5 @@
             }
             psFree(job);
-            }
+	}
     }
     psFree (cellGroups);
@@ -270,4 +270,5 @@
 	// set the radius based on the footprint (also sets the mask pixels)
 	if (!psphotSetRadiusFootprint(&radius, readout, source, markVal, 1.0)) {
+	    fprintf (stderr, "skipping (1) %f, %f\n", source->peak->xf, source->peak->yf);
 	    psFree (fitOptions)
 	    return false;
@@ -280,4 +281,5 @@
 	// XXX save the psf-based moments for output
 	if (!pmSourceMoments (source, radius, 0.0, 0.0, maskVal)) {
+	    fprintf (stderr, "skipping (2) %f, %f\n", source->peak->xf, source->peak->yf);
 	    // subtract the best fit from the object, leave local sky
 	    pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
@@ -289,8 +291,13 @@
         psImage *modelFluxStart = psMemIncrRefCounter (source->modelFlux);
 	if (!modelFluxStart) {
-	  // XXX raise an error of some kind?
-	  continue;
+	    pmSourceCacheModel (source, maskVal);
+	    modelFluxStart = psMemIncrRefCounter (source->modelFlux);
+	    if (!modelFluxStart) {
+		fprintf (stderr, "skipping (3) %f, %f\n", source->peak->xf, source->peak->yf);
+		// XXX raise an error of some kind?
+		continue;
+	    }
 	}
-
+	
         if (savePics) {
           psphotSaveImage (NULL, readout->image, "image.xp.fits");
@@ -317,4 +324,6 @@
           float SNlim = psMetadataLookupF32 (&status, model, "SNLIM_VALUE");
           assert (status);
+
+	  // fprintf (stderr, "xfit: %f, %f : %f\n", source->peak->xf, source->peak->yf, source->peak->SN); 
 
           // limit selection to some SN limit
@@ -449,4 +458,6 @@
     psFree (fitOptions);
 
+    // fprintf (stderr, "xfit : tried %ld objects\n", sources->n);
+
     // change the value of a scalar on the array (wrap this and put it in psArray.h)
     scalar = job->args->data[7];
Index: /trunk/psphot/src/psphotStackMatchPSFsUtils.c
===================================================================
--- /trunk/psphot/src/psphotStackMatchPSFsUtils.c	(revision 29026)
+++ /trunk/psphot/src/psphotStackMatchPSFsUtils.c	(revision 29027)
@@ -346,6 +346,6 @@
     if (!fake) goto escape;
 
-    dumpImage(fake, readoutSrc, index, "fake");
-    dumpImage(readoutSrc,  readoutSrc, index, "real");
+    // dumpImage(fake, readoutSrc, index, "fake");
+    // dumpImage(readoutSrc,  readoutSrc, index, "real");
 
     if (threads) pmSubtractionThreadsInit();
@@ -380,6 +380,6 @@
     }
 
-    dumpImage(readoutOut, readoutSrc, index, "conv");
-    dumpImageDiff(readoutOut, fake, readoutSrc, index, "diff");
+    // dumpImage(readoutOut, readoutSrc, index, "conv");
+    // dumpImageDiff(readoutOut, fake, readoutSrc, index, "diff");
 
     psFree(fake);
