Fixing version control bug for Templates. Code was looking for template version in the wrong place and assigning a default version number which was wrong.