Fix crash when launching an EC2 instance.