cleaned up memory leak in image loader