Fix eventFilter logic