fixed errors with unicode messages

Minor tweaks to play nice with unicode messages