fix bug in translation API