fix encoding type