Fix $-sign escaping in final output