Fix listening on sockets.