Fixed the getip method