Fix Xtemplate compiling