Fix certain queries.