fixes to DB