Index: trunk/psModules/src/astrom/pmAstrometryObjects.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryObjects.c	(revision 13932)
+++ trunk/psModules/src/astrom/pmAstrometryObjects.c	(revision 13943)
@@ -8,6 +8,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-05-03 00:10:29 $
+*  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-06-22 00:40:01 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -735,5 +735,5 @@
     if (minStat->nSigma < minSigma) {
         psError(PS_ERR_UNKNOWN, true, "Failed to find a valid match (%f sigma for best)", minStat->nSigma);
-	psFree (minStat);
+        psFree (minStat);
         return NULL;
     }
@@ -796,6 +796,10 @@
 
     // smooth histgram vector with gaussian of 1sigma = radius
-    psVectorSmooth(xHist, xHist, tweakSmooth, tweakNsigma);
-    psVectorSmooth(yHist, yHist, tweakSmooth, tweakNsigma);
+    psVector *xHistNew = psVectorSmooth(NULL, xHist, tweakSmooth, tweakNsigma);
+    psVector *yHistNew = psVectorSmooth(NULL, yHist, tweakSmooth, tweakNsigma);
+    psFree(xHist);
+    psFree(yHist);
+    xHist = xHistNew;
+    yHist = yHistNew;
 
     // select peak in x and in y
