Fix encoding type