patch to src/engine/translator.cpp