fix python3 encoding issues