Fix filter bugs