ROI out of frame bug fixed