Fix filtering clause