fixed a bug when adding custom domains didn't work for AWS ec2 instances