Index: /tags/ipp-20111110/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- /tags/ipp-20111110/psphot/src/psphotExtendedSourceFits.c	(revision 32754)
+++ /tags/ipp-20111110/psphot/src/psphotExtendedSourceFits.c	(revision 32755)
@@ -321,5 +321,5 @@
 
 	// set the fit radius based on the first radial moment (also sets the mask pixels)
-	psphotSetRadiusMomentsExact(&fitRadius, &windowRadius, readout, source, markVal);
+	psphotSetRadiusMomentsExact(&fitRadius, &windowRadius, readout, source, markVal); // NOTE : 6 allocs
 
 	// UPDATE : we have changed the moments calculation.  There is now an iteration within 
@@ -371,5 +371,6 @@
           pmModel *modelFit = NULL;
           if (convolved) {
-              modelFit = psphotFitPCM (readout, source, fitOptions, modelType, maskVal, markVal, psfSize);
+	      // NOTE : 4 more allocs to here
+              modelFit = psphotFitPCM (readout, source, fitOptions, modelType, maskVal, markVal, psfSize); // NOTE : 2313 allocs in here
               if (!modelFit) {
                   psTrace ("psphot", 5, "failed to fit psf-conv model for object at %f, %f", source->moments->Mx, source->moments->My);
Index: /tags/ipp-20111110/psphot/src/psphotRadialProfileWings.c
===================================================================
--- /tags/ipp-20111110/psphot/src/psphotRadialProfileWings.c	(revision 32754)
+++ /tags/ipp-20111110/psphot/src/psphotRadialProfileWings.c	(revision 32755)
@@ -261,4 +261,11 @@
 	psStatsInit (fluxStats);
 	psStatsInit (varStats);
+
+	if ((flux->n == 0) || (fluxVar->n == 0)) {
+	    flux->n = 0;
+	    fluxVar->n = 0;
+	    radius += dR;
+	    continue;
+	}
 
 	psVectorStats (fluxStats, flux, NULL, NULL, 0);
Index: /tags/ipp-20111110/psphot/src/psphotReplaceUnfit.c
===================================================================
--- /tags/ipp-20111110/psphot/src/psphotReplaceUnfit.c	(revision 32754)
+++ /tags/ipp-20111110/psphot/src/psphotReplaceUnfit.c	(revision 32755)
@@ -353,4 +353,5 @@
 	    source->modelPSF = modelPSF;
 	    source->modelPSF->fitRadius = radius;
+	    model = source->modelPSF;
 	}
 
Index: /tags/ipp-20111110/psphot/src/psphotSourceFits.c
===================================================================
--- /tags/ipp-20111110/psphot/src/psphotSourceFits.c	(revision 32754)
+++ /tags/ipp-20111110/psphot/src/psphotSourceFits.c	(revision 32755)
@@ -531,4 +531,5 @@
     if (TIMING) { t1 = psTimerMark ("psphotFitPCM"); }
 
+    // NOTE : 65 allocs to here
     // get the guess for sersic models 
     if (modelType == pmModelClassGetType("PS_MODEL_SERSIC")) {
@@ -560,5 +561,5 @@
 
     // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
-    pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);
+    pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);  // NOTE : 1687 allocs in here
     if (TIMING) { t5 = psTimerMark ("psphotFitPCM"); }
 
