fix '$' character escaping