Fixed references to templates