Index: /trunk/FACT++/src/EventBuilder.c
===================================================================
--- /trunk/FACT++/src/EventBuilder.c	(revision 15440)
+++ /trunk/FACT++/src/EventBuilder.c	(revision 15441)
@@ -1770,4 +1770,6 @@
 
       //and clear all buffers (might have to wait until all others are done)
+      // If minclear is 0, an event could be deleted while writing is still ongoing
+      /*
       int minclear;
       if (gi_resetR == 1) {
@@ -1777,5 +1779,6 @@
          minclear = 0;
          factPrintf(kInfo, -1, "Flush all buffers ...");
-      }
+      }*/
+      const int minclear = 900;
 
       int numclear = 1;
@@ -1991,4 +1994,6 @@
                if (j >= MAX_RUN) {
                    factPrintf(kFatal, 901, "procEvt: Can not find run %d for event %d in %d", irun, ievt, id);
+                   // FIXME: The event has to be flagged such that it will be deleted! Although that should never happen
+                   continue;
                }
                lastRun = j;
@@ -2018,5 +2023,5 @@
                //                     actRun.NroiTM = 0;
                actRun.RunTime = runCtrl[j].firstTime;
-               actRun.RunUsec = runCtrl[j].firstTime;
+               actRun.RunUsec = runCtrl[j].firstUsec;
                actRun.NBoard  = NBOARDS;
                actRun.NPix    = NPIX;
@@ -2334,5 +2339,5 @@
                //                     actRun.NroiTM = 0;
                actRun.RunTime = runCtrl[j].firstTime;
-               actRun.RunUsec = runCtrl[j].firstTime;
+               actRun.RunUsec = runCtrl[j].firstUsec;
                actRun.NBoard = NBOARDS;
                actRun.NPix = NPIX;
