Improved patching