Fix zooming logic