fixed: undefined/null templates