Some fixes for when starting with a blank database.