Index: /branches/eam_branches/20090715/psModules/src/objects/pmPSFtryModel.c
===================================================================
--- /branches/eam_branches/20090715/psModules/src/objects/pmPSFtryModel.c	(revision 25522)
+++ /branches/eam_branches/20090715/psModules/src/objects/pmPSFtryModel.c	(revision 25523)
@@ -141,6 +141,6 @@
 	if (psfTry->psf->dApResid < minPSF->dApResid) {
 	    psFree (minPSF);
+	    psFree (minMask);
 	    minPSF = psMemIncrRefCounter(psfTry->psf);
-	    psFree (minMask);
 	    minMask = psMemIncrRefCounter(psfTry->mask);
 	}
@@ -150,7 +150,7 @@
     // keep the ones matching the min systematic error:
     psFree (psfTry->psf);
-    psfTry->psf = psMemIncrRefCounter(minPSF);
     psFree (psfTry->mask);
-    psfTry->mask = psMemIncrRefCounter(minMask);
+    psfTry->psf = minPSF;
+    psfTry->mask = minMask;
     
     // XXXXX this is probably not used any more.  Are the chisq of the fits so bad? can we
