Slightly more robust retrieval of ip