Fix to lock histogram.