fixup db stuff