Improved the unbinding of sockets.