Fix database initialization