Add query limit after filtering