fix event code