Fix bofh for py3.