fix string encode issue