Fix terminate for autoscaling instances