don't reference free'd memory, and don't leak memory if the image cache is not saving...