fix setting up IP socket