minor db fixes