fixing encoding issue for Python 2