Bugfix for template