fixes #763 - encoding issues