Fix misusage of ip object.