Python3 version seems to work well, with several other bugfixes