fix-398 code is now compatible py3.x