improved the ec2-hostname support