Fix xptemplate patch.