Fixed crash in beta ocr feature