Index: trunk/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 39289)
+++ trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 39290)
@@ -720,4 +720,5 @@
       image[im].dMcal = mosaic[i].dMcal;
       image[im].Xm = mosaic[i].Xm;
+      image[im].ubercalDist = mosaic[i].ubercalDist;
       image[im].dMagSys = mosaic[i].dMsys;
       image[im].nFitPhotom = mosaic[i].nFitPhotom;
Index: trunk/Ohana/src/relphot/src/setMrelCatalog.c
===================================================================
--- trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 39289)
+++ trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 39290)
@@ -74,5 +74,4 @@
     }
   }
-
   return (TRUE);
 }
@@ -360,4 +359,9 @@
     int minRank = (Nranking > 0) ? results->psfData[Nsec].ranking[0] : 10;
 
+    // when running -averages, we have no information about the images, so we cannot set this
+    if (results->minUbercalDist[Nsec] > -1) {
+      secfilt[Nsec].ubercalDist = results->minUbercalDist[Nsec];
+    }
+
     if (isSetMrelFinal) {
       if ((average[0].objID == TEST_OBJ_ID) && (average[0].catID == TEST_CAT_ID)) {
@@ -367,9 +371,4 @@
       // mark the measurements matching this ranking 
       markMeasureByRanking (&results->psfData[Nsec], measure, minRank, ID_MEAS_PHOTOM_PSF);
-
-      // when running -averages, we have no information about the images, so we cannot set this
-      if (results->minUbercalDist[Nsec] > -1) {
-	secfilt[Nsec].ubercalDist = results->minUbercalDist[Nsec];
-      }
 
       if (Nranking) {
