fix so templates load when custom_tpl is 'undefined'