fixed encode issue