fix for backslashes in data not encoding correctly