Fixed unicode issues in python 2.