Fixes to DB struct