fixed events query