fixed bug with index in frequency duration.