Batch function fixes