SelectROIs bug fixes

Several bug fixes for selectROIs
Merge remote-tracking branch 'origin/ari'