Fix behavoir with charset convertion