core: switch to events to ensure consistency.