Batch Size Detection Improvements