Fix parsing queries.