fix freqtable

fixing a horrible mistake in the freatable function