Fixed a template routing bug