Fixed the template stuffs