fix hist limit issue for step* for both linear and log scale

Fix two closely related issue:
#1066
and
#196