memory fixes in image loader