Fixed bug with calculating highest freq