Workarounds for the bugs of the day

Probably cleaner to use `<<'EOF'` rather than have to escape interpolation within the patch.