fix ip address parsing