Fix the problem with encoding