fix some encoding issues