Fix aggregation job claim query.