Fixed LinkStream memory leak