Yet more fixes to DbConnector.

DONT FUCKING COPY AND PASTE WITHOUT CHANGING WHAT YOURE COPYING.