fix mistake in template code