fix some quoting/escaping issues