Fix filter param logic