Merge "panic when failing to apply patch" into main