Index: /branches/eam_branches/ipp-20100621/psphot/src/psphotSourceFits.c
===================================================================
--- /branches/eam_branches/ipp-20100621/psphot/src/psphotSourceFits.c	(revision 28977)
+++ /branches/eam_branches/ipp-20100621/psphot/src/psphotSourceFits.c	(revision 28978)
@@ -550,7 +550,4 @@
 	psphotSetRadiusFootprint(&model->fitRadius, readout, source, markVal, 0.5);
 
-	// update the pcm elements if we have changed the circumstance (eg, source->pixels)
-	pmPCMupdate(pcm, source, fitOptions, model);
-
     	if (!psphotFitSersicIndexPCM (pcm, readout, source, fitOptions, maskVal, markVal, psfSize)) {
 	    model->flags |= PM_MODEL_STATUS_BADARGS;
@@ -562,6 +559,4 @@
 	psphotSetRadiusFootprint(&model->fitRadius, readout, source, markVal, 1.0);
     }
-    // update the pcm elements if we have changed the circumstance (eg, source->pixels)
-    pmPCMupdate(pcm, source, fitOptions, model);
 
     if (modelType == pmModelClassGetType("PS_MODEL_SERSIC")) {
@@ -570,4 +565,6 @@
 	options.mode = PM_SOURCE_FIT_EXT;
     }
+    // update the pcm elements if we have changed the circumstance (options.mode or source->pixels)
+    pmPCMupdate(pcm, source, &options, model);
 
     // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
@@ -657,4 +654,7 @@
     options.nIter = 4;
 
+    // update the pcm elements if we have changed the circumstance (here, options.mode)
+    pmPCMupdate(pcm, source, &options, model);
+
     int iMin = -1;
     float xMin = NAN;
