Fixed repository behavior when having no HTML templates assigned