Fix bug in check_public-ip