fix query filter