Added a check of region of interest  values