fix segv on dbi-close