Fix origin after zooming and resizing