fixed several parsing issues involving escaping.