fixed variables in custom.tpl issue