Index: /trunk/FACT++/src/smartfact.cc
===================================================================
--- /trunk/FACT++/src/smartfact.cc	(revision 16079)
+++ /trunk/FACT++/src/smartfact.cc	(revision 16080)
@@ -355,5 +355,5 @@
     };
 
-    class EventHist : public deque<EventElement>
+    class EventHist : public list<EventElement>
     {
         const boost::posix_time::time_duration deltat; //boost::posix_time::pos_infin
@@ -374,10 +374,9 @@
         {
             for (auto it=begin(); it!=end();)
-                for (it=begin(); it!=end(); it++)
-                    if (!it->time)
-                    {
-                        erase(it);
-                        break;
-                    }
+                if (!it->time)
+                {
+                    const auto is = it++;
+                    erase(is);
+                }
         }
 
