Fix applying template

Refs #1704