Fixed database initialization process