fix string encoding discrepencies