Corrected compile error in the templates