patchvar fix