fix event ordering