Fix attempt #2 for proper tuning frequency calculation.