fix issue: calculate histogram error because forgot to reset buffer to
zero.