update the view & fix the encode issue