resolve encoding issues