repaired heap corruption when using -scaleup