Template element names are not set correctly on prepare
Fixes #3