fix patching