Fixed bugs related to copying images with different ROI.