Fix for .template is undefined.
Merge pull request #406 from vorburger/develop_UGD-Fix

URGENT Fix for "Cannot read property 'name' of undefined." (AKA "$data.template is undefined.")