Fix errors in db_structure