DB/Misc: Some misc db fixes