fixed misapplied escaping in exception handling