bugfix for SocketException