Fix raw queries.