Fixed a bug with conditional executions in events.