fix the fixutf8 function