fix memory leak
-fixed memory leak
-mulitthreaded image fetching