Index: /tags/ipp-20100610/psModules/src/imcombine/pmPSFEnvelope.c
===================================================================
--- /tags/ipp-20100610/psModules/src/imcombine/pmPSFEnvelope.c	(revision 28332)
+++ /tags/ipp-20100610/psModules/src/imcombine/pmPSFEnvelope.c	(revision 28333)
@@ -33,5 +33,5 @@
 
 
-// #define TESTING                         // Enable test output
+//#define TESTING                         // Enable test output
 // #define PEAK_NORM                       // Normalise peaks?
 #define PEAK_FLUX 1.0e4                 // Peak flux for each source
@@ -235,5 +235,5 @@
 
             // Get the radius
-            pmModel *model = pmModelFromPSFforXY(psf, x, y, PEAK_FLUX); // Model for source
+            pmModel *model = pmModelFromPSFforXY(psf, source->peak->xf, source->peak->yf, PEAK_FLUX); // Model for source
             if (!model || (model->flags & MODEL_MASK)) {
                 continue;
@@ -321,5 +321,5 @@
     numFakes = fakes->n;
 
-    if (numFakes == 0.0) {
+    if (numFakes == 0) {
         psError(PS_ERR_UNKNOWN, false, "No fake sources are suitable for PSF fitting.");
         psFree(fakes);
