Index: /trunk/Mars/mcore/fits.h
===================================================================
--- /trunk/Mars/mcore/fits.h	(revision 12706)
+++ /trunk/Mars/mcore/fits.h	(revision 12707)
@@ -229,5 +229,5 @@
                 const string id   = Get<string>("TTYPE"+num.str());
                 const string fmt  = Get<string>("TFORM"+num.str());
-                const string unit = Get<string>("TUNIT"+num.str(), "");
+                const string unit = "Empty";//Get<string>("TUNIT"+num.str());
 
                 istringstream sin(fmt);
@@ -416,4 +416,24 @@
                     vec.push_back(string("END     = '' / "));
             }
+            else
+            {
+                char value = str[0];
+                int valuei = (int)(value);
+            }
+            //Would have liked to do it with a string comparison, but could not figure out the character for value 32...
+            bool isNULL = true;
+            for (int j=0;j<80;j++)
+                if (int(str[j]) != 32)
+                    isNULL = false;
+            if (isNULL)
+            {
+                if (!endtag)
+                    cout << "WARNING: END keyword missing. Loaded data may be corrupted" << endl;
+
+                endtag = true;
+
+                if (vec.size()%36==0)
+                    vec.push_back(string("END     = '' / "));
+            }
 
             if (endtag)
