Index: trunk/psphot/src/psphotStackReadout.c
===================================================================
--- trunk/psphot/src/psphotStackReadout.c	(revision 38385)
+++ trunk/psphot/src/psphotStackReadout.c	(revision 38512)
@@ -35,4 +35,6 @@
 	psphotSaveImage (NULL, readout->mask, line);
     }
+    // psphotSaveImage leaves an error on the stack
+    psErrorClear();
     return true;
 }
@@ -348,5 +350,8 @@
     // XXX NOTE : if we use the pre-20130914 psphotStackReadout code, we need to use 'false' for the
     // sourcesSubtracted argument
-    psArray *objectsOut = psphotSourceChildrenByObject (config, view, STACK_OUT, objects, true);
+
+    // do this here so that the variance image is available to reset the models
+    psphotStackMatchPSFsetup (config, view, STACK_OUT, STACK_RAW);
+    psArray *objectsOut = psphotSourceChildrenByObject (config, view, STACK_OUT, STACK_RAW, objects, true);
     if (!objectsOut) {
 	psFree(objects);
@@ -364,5 +369,4 @@
 
 	// set up the FWHM vector
-	psphotStackMatchPSFsetup (config, view, STACK_OUT, STACK_RAW);
 	psphotDumpImages (config, view, STACK_RAW, "raw.t0");
 	psphotDumpImages (config, view, STACK_OUT, "out.t0");
