Fixes zoomToRect function

Fixes zoomToRect function