Some leftover fixes in db classes.