Fix encoding setting