correctly handling wrong ip address case