Works around encoding issues in input