added a test to see if the IP actually changed before trying to update the record