added content_type_id for templates and fixed templatye updating bugs