fixed overwriting of roi