Fixed bug with template tags.