batch processing bug fixes