fix python2 unicode related problems