fix error when there are no public ip address
Merge pull request #46 from whitekid/master

fix error when there are no public ip address