tests and db tweak