Try to fix a tesseract memory problem (detected by Valgrind)