Fixed "undefined" bag for event-handlers