fix tmplvar