Added support for events outside tasks