Fixed template only being partially applied
Merge pull request #886 from jpeg729/bugfix

Fixed template only being partially applied