Fix filter implementation