Bf/py3 fixes: none of them is elegant and underlying problem stinks with ancient code

but they should get the job done -- wait for travis to report though!