further minor db fixes