Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/ImageSubset.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/ImageSubset.c	(revision 33241)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/ImageSubset.c	(revision 33242)
@@ -69,5 +69,5 @@
   // XXX free the fits table data here 
 
-  ALLOCATE (image, ImageSubset, Ncol);
+  ALLOCATE (image, ImageSubset, Nrow);
   for (i = 0; i < Nrow; i++) {
     image[i].imageID       = imageID[i];
@@ -77,5 +77,5 @@
     image[i].dMcal         = dMcal[i];
   }
-  fprintf (stderr, "loaded data for %d images\n", Ncol);
+  fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow);
 
   free (Mcal);
@@ -85,5 +85,5 @@
   free (flags);
 
-  *nimage = Ncol;
+  *nimage = Nrow;
   return image;
 }
Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c	(revision 33241)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c	(revision 33242)
@@ -17,4 +17,7 @@
   }
   ALLOCATE (index, off_t, maxID + 1);
+  for (i = 0; i < maxID + 1; i++) {
+    index[i] = -1;
+  }
   for (i = 0; i < Nimage; i++) {
     if (!image[i].imageID) continue; // images with ID == 0 are virtual
