This fixes the problem that P3M tuning sometimes produced parameters that didn't give correct results