fix error when there are no public ip address