fix exception message in ocr