Final fix to translate function.