Corrected iterators in centroid frequency error calucluation.