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);
 
