Fix event filter logic.