fixed encode problem.