fix sql string leak regressions