Fix the batch indexing operations.