Fixes client socket connection