fix hist off by one