Fix Batch Capacity null problem