add short-term hack to update the event counter without being caught in a race condition