Fix: event trigger timing and tests.