Fixed bug in ocr regarding batch