Small DB fixes