modify a bug in roi.py