Fix bag search query.