r37 python api bug fix