Prevent division by zero when no events are actually written
Remove NPE for version roots.