Bug fix for frequency check.