Fixed output encoding issues