fix error in empty template