Some python3-specific fixes.
1.9.67