Fixed smooth_hist functionality