Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 8966)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 8970)
@@ -276,5 +276,7 @@
     if (fFormatVersion>10)
     {
-        if (GetRunID()!=fTelescopeNumber && GetRunID()!=fTelescopeNumber*10U && GetRunID()!=fTelescopeNumber*10U+5U)
+        if (GetTypeID()!=fTelescopeNumber     &&
+            GetTypeID()!=fTelescopeNumber*10U &&
+            GetTypeID()!=fTelescopeNumber*10U+5U)
         {
             *fLog << err << "ERROR - Telscope number " << fTelescopeNumber << " doesn't match the first two digits of the run number " << fRunNumber << "." << endl;
Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 8966)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 8970)
@@ -106,5 +106,5 @@
     UInt_t   GetRunNumber() const         { return fRunNumber; }
     UInt_t   GetFileNumber() const        { return fFileNumber; }
-    UInt_t   GetRunID() const             { return (fRunNumber/1000000)%100; }
+    UInt_t   GetTypeID() const            { return (fRunNumber/1000000)%100; }
     UInt_t   GetFileID() const            { return fRunNumber>1000000?(fRunNumber%1000000)*1000+(fFileNumber%1000):fRunNumber; }
     UShort_t GetTelescopeNumber() const   { return fRunType; }
@@ -127,5 +127,5 @@
     const MTime &GetRunStart() const      { return fRunStart; }
     const MTime &GetRunEnd() const        { return fRunStop; }
-    Double_t GetRunLength() const         { return fRunStop-fRunStart; }
+    Double_t GetRunLength() const         { return !fRunStart || !fRunStop ? 0 : fRunStop-fRunStart; }
     Short_t GetPixAssignment(UShort_t i) const;
     UShort_t GetMaxPixId() const;
