Fix database initialization issue