[TIMOB-16523] Fixed bugs in the event system.