fix for UnicodeEncodeError
Merge pull request #900 from andrzej-jankowski/scan_merger_fix