Fixed on_event not being called for plugins