fix crash on query alerts