Fixed purity calculations.