batch_stats fixes