fixed remaining issues of python3