fix event query