Put thumbnail memleak fix back in