Change IP code to work with Windows