Add possibility to keep the original sum of weights to normalize the template