Fix to unicode problem in 2.7