Fixed a mishap in pre-patching code