Batch: Fixed crash related to statistics calculations