Fixed so the scaling applied correctly when resizing the window-