Fix error in required frequency calculation