fixed edge case of \\' in string handling