Fixed some bugs in translation