Fixed a bug in translate

Signed-off-by: Archit Shukla <architshukla2@gmail.com>