Fix unicode bug from python3 conversion