fix consistency of encoding type