bug fix for ROI subtraction