Fix couple of bugs in IpTools