fixed a problem with low statistics templates for the randomization