added some additional checks for the base frequency range to prevent potential numerical problems.