fix #12 for events