fixed quoting of dbi string in sql queries