Fix autoscale to always work when resizing window