fix event, add event_listener_alloc and event_listener_free functions