Fixed template error when some values are not provided