Fix fundamental frequency calculation.