Fix bug with incorrect ip addresses