Panning and zooming now works correctly