Fix query filter