Resolving errors in Histogram