Fix for unicode error in Python 2.x