Index: trunk/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- trunk/psphot/src/psphotExtendedSourceFits.c	(revision 31452)
+++ trunk/psphot/src/psphotExtendedSourceFits.c	(revision 31673)
@@ -268,4 +268,5 @@
     float radius;
     psScalar *scalar = NULL;
+    pmMoments psfMoments;
 
     // arguments: readout, sources, models, region, psfSize, maskVal, markVal
@@ -333,7 +334,9 @@
 	// this uses the footprint to judge both radius and aperture?
 	// XXX save the psf-based moments for output
+	psfMoments = *source->moments;
 	if (!pmSourceMoments (source, radius, 0.0, 0.0, 0.0, maskVal)) {
+	    // subtract the best fit from the object, leave local sky
 	    fprintf (stderr, "skipping (2) %f, %f\n", source->peak->xf, source->peak->yf);
-	    // subtract the best fit from the object, leave local sky
+	    *source->moments = psfMoments;
 	    pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
 	    // XXX raise an error flag of some kind
@@ -348,4 +351,5 @@
 	    if (!modelFluxStart) {
 		fprintf (stderr, "skipping (3) %f, %f\n", source->peak->xf, source->peak->yf);
+		*source->moments = psfMoments;
 		pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
 		// XXX raise an error of some kind?
@@ -467,4 +471,5 @@
           source->modelFlux = modelFluxStart;
 
+	  *source->moments = psfMoments;
           pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
 
@@ -492,4 +497,7 @@
         source->modelFlux = psMemIncrRefCounter (modelFluxes->data[minModel]);
 
+	// replace the original moments
+	*source->moments = psfMoments;
+
         // subtract the best fit from the object, leave local sky
         pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
