fixed bug where setting ROI only worked the first time