Fix bug to reset frequency.