fix for socket connection