fixed two bugs in the translator