fix Smarty for local vars