Make frequency handling handle errors a little bit more robust