Fix util.clone_database and fix settings