Patches - break patch execution on error.
Attachments - set undefined variable
Fix attachments patch - variable undefined and wrong function name