Fixed memleak when downloading thumbnails.