Fixed "index" issues in the database setup process.