diff --git a/lib/mentat/reports/utils.py b/lib/mentat/reports/utils.py
index 52e409677aa5093452c20e7a377da85f0711fff5..df10a6be0b88caaba1fe784f24fd13a33bc3b7bc 100644
--- a/lib/mentat/reports/utils.py
+++ b/lib/mentat/reports/utils.py
@@ -501,7 +501,12 @@ class SimpleMemoryThresholdingCache(ThresholdingCache):
         """
         *Interface implementation:* Implementation of :py:func:`mentat.reports.utils.ThresholdingCache.cleanup` method.
         """
-        return {'thresholds': 0, 'events': 0}
+        result = {
+            'thresholds': len(self.memcache),
+            'events': 0
+        }
+        self.memcache = {}
+        return result
 
 
 class SingleSourceThresholdingCache(SimpleMemoryThresholdingCache):
diff --git a/lib/mentat/stats/idea.py b/lib/mentat/stats/idea.py
index ee71bfb2cb9da478b5b888c5ecf03c84c42c27bd..cdc02da523e95e7d8dcb96f62d51bc245216f3ad 100644
--- a/lib/mentat/stats/idea.py
+++ b/lib/mentat/stats/idea.py
@@ -285,7 +285,7 @@ def evaluate_timeline_events(events, dt_from, dt_to, max_count, stats = None):
 
     for event in events:
         # Detect recurring events.
-        recurring = tcache.event_is_thresholded(event, None)
+        recurring = tcache.event_is_thresholded(event, None, None)
         tcache.set_threshold(event, None, None, None, None)
 
         # Include event into global statistics.