Fix to discToFreq and freqToDisc