Histogram: fixed bug with discrete and periodic cvs
reported by Omar