handle if invalid tpl is passed in