Bugfix by turegjorup: Fixed issue with template loading through /api/templates