fixed the errors in the templates