Minor db fixes.