fixed an error that occurred when patching.