DB/Misc: Some misc db fixes
DB/Misc: Fix up previous push.
Merge branch 'master' into my_work