some fixes to bleu python compatibility