Fixed bug in templates tests.