fixes to the DB build process