Fixed yet another template bug