Begall's db fixes

Replaces #1705