Fix yet another UnicodeDecode issue with Python 2
Fix potential syntax error in unit test