Added checking of Ip