corrected a unicode error on py27