more fixes for database setup scripts