fix bug for null public dns name