#1640: Weirdness with escaped strings in sql queries. Remove debugging lines.