fixes error escaping in ps1