Remove error assertion in templates