fixed a bug to convert bytes to unicode