Solve encoding error for countings.