Correct minor issues in python3