Fix query events