More DB fixes