Further mucking about with IP data type, this should make it work.