fix encoding issues with hashsum calculation