FIX DataSet sorting getAccumulatedFrequencies to match original implementation