Index: trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5521)
+++ trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5547)
@@ -267,9 +267,18 @@
    if (fCheckWinLast > lastavailable) //changed to override check
      {
-       *fLog << warn << GetDescriptor();
-       *fLog << " - WARNING: Last Check Window slice out of range...adjusting to last available slice ";
-       *fLog << lastavailable << endl;
+       *fLog << warn << GetDescriptor()
+             << " - WARNING: Last Check Window slice out of range...adjusting to last available slice "
+             << lastavailable << endl;
        
        fCheckWinLast = lastavailable;
+     }
+
+   if (fCheckWinLast < fExtractWinLast) 
+     {
+       *fLog << warn << GetDescriptor()
+             << " - WARNING: Last Check Window slice lower than extraction window "
+             << " - push it up to last number of low-gain samples: ";
+       fCheckWinLast = fExtractWinLast;
+       *fLog << fCheckWinLast << endl;
      }
 
