Fix bug when too many events are republished