Index: branches/czw_branch/20160809/Ohana/src/relastro/src/FitChip.c
===================================================================
--- branches/czw_branch/20160809/Ohana/src/relastro/src/FitChip.c	(revision 39737)
+++ branches/czw_branch/20160809/Ohana/src/relastro/src/FitChip.c	(revision 39738)
@@ -227,5 +227,5 @@
   image[0].nFitAstrom = fit[0].Npts;
 
-  fprintf (stderr, "%s | %6.3f %6.3f | %4d %4d | %6.3f %6.3f\n", image[0].name, image[0].refColorRed, image[0].refColorBlue, Ncolor, image[0].nFitAstrom, image[0].dXpixSys, image[0].dYpixSys);
+  if (VERBOSE2) fprintf (stderr, "%s | %6.3f %6.3f | %4d %4d | %6.3f %6.3f\n", image[0].name, image[0].refColorRed, image[0].refColorBlue, Ncolor, image[0].nFitAstrom, image[0].dXpixSys, image[0].dYpixSys);
 
   if (fit) fit_free (fit);
Index: branches/czw_branch/20160809/Ohana/src/relastro/src/FitPM.c
===================================================================
--- branches/czw_branch/20160809/Ohana/src/relastro/src/FitPM.c	(revision 39737)
+++ branches/czw_branch/20160809/Ohana/src/relastro/src/FitPM.c	(revision 39738)
@@ -71,5 +71,5 @@
 
   // Iteratively reweight and solve
-  double sigma_hat = 0.0; // save for the error model
+  // double sigma_hat = 0.0; // save for the error model
   int converged = FALSE;
   int iterations = 0;
@@ -107,5 +107,5 @@
 	points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
       }
-      sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+      // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
       break;
     }
@@ -122,5 +122,5 @@
       points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
     }
-    sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+    // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
     
     // Check convergence
Index: branches/czw_branch/20160809/Ohana/src/relastro/src/FitPMandPar.c
===================================================================
--- branches/czw_branch/20160809/Ohana/src/relastro/src/FitPMandPar.c	(revision 39737)
+++ branches/czw_branch/20160809/Ohana/src/relastro/src/FitPMandPar.c	(revision 39738)
@@ -71,5 +71,5 @@
 
   // Iteratively reweight and solve
-  double sigma_hat = 0.0; // save for the error model
+  // double sigma_hat = 0.0; // save for the error model
   int converged = FALSE;
   int iterations = 0;
@@ -108,5 +108,5 @@
 	points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
       }
-      sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+      // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
       break;
     }
@@ -123,5 +123,5 @@
       points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
     }
-    sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+    // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
 
     // Check convergence
Index: branches/czw_branch/20160809/Ohana/src/relastro/src/FitPosPMfixed.c
===================================================================
--- branches/czw_branch/20160809/Ohana/src/relastro/src/FitPosPMfixed.c	(revision 39737)
+++ branches/czw_branch/20160809/Ohana/src/relastro/src/FitPosPMfixed.c	(revision 39738)
@@ -107,5 +107,5 @@
 
   // Iteratively reweight and solve
-  double sigma_hat = 0.0; // save for the error model
+  // double sigma_hat = 0.0; // save for the error model
   int converged = FALSE;
   int iterations = 0;
@@ -141,5 +141,5 @@
 	points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
       }
-      sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+      // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
       break;
     }
@@ -156,5 +156,5 @@
       points[i].u = sqrt(SQ(points[i].rx / points[i].dX) + SQ(points[i].ry / points[i].dY));
     }
-    sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
+    // sigma_hat = MedianAbsDeviation(points, Npoints) / 0.6745;
     
     // Check convergence
Index: branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_images.c
===================================================================
--- branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_images.c	(revision 39737)
+++ branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_images.c	(revision 39738)
@@ -92,5 +92,5 @@
     case SET_CHIPS:
       // we just want to fit the selected chips to the mean positions
-      UpdateChips (catalog, Ncatalog, i);   // measure.X,Y -> R,D, fit image.coords
+      UpdateChips (catalog, Ncatalog, 0);   // measure.X,Y -> R,D, fit image.coords
       MARKTIME("update chips: %f sec\n", dtime);
 
@@ -109,12 +109,4 @@
   }
 
-  if (!UPDATE) { 
-    freeStarMaps();
-    gfits_db_free (&db);
-    ohana_memcheck (VERBOSE);
-    ohana_memdump (VERBOSE);
-    exit (0);
-  }
-
   // free the image / measurement pointers
   freeImageBins (Ncatalog);
@@ -124,4 +116,12 @@
   free (catalog);
   freeMosaics ();
+
+  if (!UPDATE) { 
+    freeStarMaps();
+    dvo_image_unlock (&db); 
+    freeImages (db.ftable.buffer);
+    gfits_db_free (&db);
+    return TRUE;
+  }
 
   // If we did NOT use all images, then we applied the measured corrections to a subset of
