fixing address problem in custom socket