Improvements to autoscaling