Another try at fix for intermittent utf-8 issue. seems to work.