fix database initialization