patched apply-transform