Made ocr engine closeable