templates: templates loading order fix