improve stability, add support to area ROI