Fix issue in copying over template.

[merge]