Index: trunk/Ohana/src/addstar/src/FilterStars.c
===================================================================
--- trunk/Ohana/src/addstar/src/FilterStars.c	(revision 39272)
+++ trunk/Ohana/src/addstar/src/FilterStars.c	(revision 39273)
@@ -19,8 +19,8 @@
   MTIME = (image[0].exptime > 0) ? 2.500*log10(image[0].exptime) : 0.0;
 
-  RMIN = 360.0;
-  RMAX =   0.0;
-  DMIN = +90.0;
-  DMAX = -90.0;
+  RMIN = region->Rmin;
+  RMAX = region->Rmax;
+  DMIN = region->Dmin;
+  DMAX = region->Dmax;
 
   /* modify resulting star list */
@@ -182,12 +182,9 @@
   if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX);
 
-  float dR = RMAX - RMIN;
-  float dD = DMAX - DMIN;
-
   // define containing region a bit generously
-  region->Rmin = RMIN - 0.1*dR;
-  region->Rmax = RMAX + 0.1*dR;
-  region->Dmin = DMIN - 0.1*dD;
-  region->Dmax = DMAX + 0.1*dD;
+  region->Rmin = RMIN;
+  region->Rmax = RMAX;
+  region->Dmin = DMIN;
+  region->Dmax = DMAX;
 
   return (outcat);
Index: trunk/Ohana/src/addstar/src/LoadData.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadData.c	(revision 39272)
+++ trunk/Ohana/src/addstar/src/LoadData.c	(revision 39273)
@@ -110,5 +110,15 @@
     matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt
 
-    find_matches_closest (region, newcat, catalog, matchOptions);
+    SkyRegion matchRegion;
+    float dR = region->Rmax - region->Rmin;
+    float dD = region->Dmax - region->Dmin;
+
+    // define matchRegion a bit generously
+    matchRegion.Rmin = region->Rmin - 0.1*dR;
+    matchRegion.Rmax = region->Rmax + 0.1*dR;
+    matchRegion.Dmin = region->Dmin - 0.1*dD;
+    matchRegion.Dmax = region->Dmax + 0.1*dD;
+
+    find_matches_closest (&matchRegion, newcat, catalog, matchOptions);
     dvo_catalog_free (newcat);
     free (newcat);
Index: trunk/Ohana/src/addstar/src/LoadStars.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadStars.c	(revision 39272)
+++ trunk/Ohana/src/addstar/src/LoadStars.c	(revision 39273)
@@ -17,4 +17,10 @@
   ALLOCATE (catalog->measure, Measure, 1);
   ALLOCATE (catalog->lensing, Lensing, 1);
+
+  SkyRegion region;
+  region.Rmin =  720.0;
+  region.Rmax = -720.0;
+  region.Dmin =  180.0;
+  region.Dmax = -180.0;
 
   for (i = 0; i < Nfile; i++) {
@@ -75,5 +81,4 @@
     }
 
-    SkyRegion region;
     newcat = LoadData (f, &file[i], images, Nimages, headers, extsize, headerSets, NheaderSets, &region, options);
 
@@ -89,5 +94,15 @@
       matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt
       
-      find_matches_closest (&region, newcat, catalog, matchOptions);
+      SkyRegion matchRegion;
+      float dR = region.Rmax - region.Rmin;
+      float dD = region.Dmax - region.Dmin;
+
+      // define matchRegion a bit generously
+      matchRegion.Rmin = region.Rmin - 0.1*dR;
+      matchRegion.Rmax = region.Rmax + 0.1*dR;
+      matchRegion.Dmin = region.Dmin - 0.1*dD;
+      matchRegion.Dmax = region.Dmax + 0.1*dD;
+
+      find_matches_closest (&matchRegion, newcat, catalog, matchOptions);
     }
 
Index: trunk/Ohana/src/addstar/src/addstar.c
===================================================================
--- trunk/Ohana/src/addstar/src/addstar.c	(revision 39272)
+++ trunk/Ohana/src/addstar/src/addstar.c	(revision 39273)
@@ -234,6 +234,4 @@
   FreePhotcodeTable ();
   SkyTableFree (sky);
-  ohana_memcheck (1);
-  ohana_memdump (1);
   exit (0);
 }
