Fixing a major bug in the bulk indexing.