Fixed encoding error with Python 3.x