Fix for connecting device socket.