Query filter fix