template impl changes must not insist on element.template.id but on
element.templateId. controller must ensure this field consistency during
update()
Merge pull request #40 from pisi79/master

template impl changes during update fixed