Index: /trunk/FACT++/src/fitsCompressor.cc
===================================================================
--- /trunk/FACT++/src/fitsCompressor.cc	(revision 16417)
+++ /trunk/FACT++/src/fitsCompressor.cc	(revision 16418)
@@ -1476,5 +1476,5 @@
 
     //Open input's fits file
-    factFits inFile(fileNameIn);
+    factfits inFile(fileNameIn);
 
     if (inFile.IsCompressedFITS())
@@ -1504,5 +1504,5 @@
 
     //Because the file to open MUST be given by the constructor, I must use a pointer instead
-    factFits* drsFile = NULL;
+    factfits* drsFile = NULL;
     //try to open the Drs file. If any.
     if (drsFileName != "")
@@ -1510,5 +1510,5 @@
         try
         {
-            drsFile = new factFits(drsFileName);
+            drsFile = new factfits(drsFileName);
         }
         catch (...)
@@ -1762,5 +1762,5 @@
 
     //get a compressed reader
-    factFits verifyFile(fileNameOut, tableName, false);
+    factfits verifyFile(fileNameOut, tableName, false);
 
     //and the header of the compressed file
Index: /trunk/Mars/mcore/factfits.h
===================================================================
--- /trunk/Mars/mcore/factfits.h	(revision 16417)
+++ /trunk/Mars/mcore/factfits.h	(revision 16418)
@@ -57,5 +57,8 @@
 
         int16_t *startCell = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetStartCellData);
-        int16_t *data      = reinterpret_cast<int16_t*>(fBufferRow.data() + offset + fOffsetData);
+
+        const Pointers::iterator dtaIt = fPointers.find("Data");
+        if (dtaIt == fPointers.end()) return true;
+        int16_t *data      = reinterpret_cast<int16_t*>(dtaIt->second);
 
         for (uint32_t i=0; i<1440*1024; i+=1024, startCell++)
Index: /trunk/Mars/mcore/zfits.h
===================================================================
--- /trunk/Mars/mcore/zfits.h	(revision 16417)
+++ /trunk/Mars/mcore/zfits.h	(revision 16418)
@@ -146,5 +146,5 @@
                 //swap the bytes
                 int64_t tempValues[2] = {0,0};
-                revcpy<8>(reinterpret_cast<char*>(tempValues[0]), readBuf, 2);
+                revcpy<8>(reinterpret_cast<char*>(&tempValues[0]), readBuf, 2);
 
                 //add catalog entry
@@ -153,5 +153,5 @@
 
         //see if there is a gap before heap data
-        fHeapOff = fTable.GetHeapShift();
+        fHeapOff = tellg()+fTable.GetHeapShift();
     }
 
@@ -179,5 +179,5 @@
 
             //skip to the beginning of the tile
-            seekg(fCatalog[currentCatRow][0].second, ios_base::cur);
+            seekg(fHeapOff+fCatalog[currentCatRow][0].second);
             read(fCompressedBuffer.data(), sizeToRead);
 
