A few fixes for translate.py