Fixed (de)serialization of histogram.