Bug on the histogram function sorted.