fix event processing in tests