Fix the query.