Added check for zero freq in SetClock