Fix zooming in histogram

Fixes #416