More db fixes.