fix event definition bug