Some code change to avoid a memory leak when ROI/FWHM is used