Added auto patching