Finally zooming and panning works as expected