fix undefined drawHistogram error