Fixed standing query events.
Added test for standing query events.