fix for event queries