bugfix in equalizeHist