Fixed event filtering bug