fix getIntervalsFromNumBins