Fixed bad references in add_event.