diff --git a/zUtil_ForwardSim/gtFwdSimBuildDifstackBlobs.m b/zUtil_ForwardSim/gtFwdSimBuildDifstackBlobs.m
index edef6589ab7b78e8836e197e2375728232137893..bf49e9109365dd12706459190c774f6ca0fe9470 100644
--- a/zUtil_ForwardSim/gtFwdSimBuildDifstackBlobs.m
+++ b/zUtil_ForwardSim/gtFwdSimBuildDifstackBlobs.m
@@ -47,7 +47,7 @@ function bl = gtFwdSimBuildDifstackBlobs(blobids, indexes, parameters, stackUSiz
         shifts_blob = gtFwdSimGetStackShifts(stackUSize, stackVSize, blob_bb, false);
         shifts = [shifts_blob.u, shifts_blob.v, 1];
 
-        % We are applying a padding of one slice (perside) on the w
+        % We are applying a padding of one slice (per side) on the w
         % diretion
         blob_size_im = [stackUSize, stackVSize, blob_bb(6)+2];
         blob_bb_im = [blob_bb(1:3) - shifts, blob_size_im];
diff --git a/zUtil_ForwardSim/gtGetRawRoi.m b/zUtil_ForwardSim/gtGetRawRoi.m
index 4319c96ed7a73dcb1fb4e13415e46116bdd7dd10..18f69b9838d3af611ddce72673c93cbcc446b65d 100644
--- a/zUtil_ForwardSim/gtGetRawRoi.m
+++ b/zUtil_ForwardSim/gtGetRawRoi.m
@@ -2,6 +2,9 @@ function [spot, m] = gtGetRawRoi(start_image, end_image, acq, bb)
 % GETRAWROI Sums a roi in raw images
 %   [spot, m] = gtGetRawRoi(start_image, end_image, acq, bb)
 
+    p = struct('acq', acq);
+    tot_images = gtGetTotNumberOfImages(p);
+
     nimages = end_image - start_image + 1;
     spot    = zeros(bb(4), bb(3), nimages);
     m       = zeros(nimages, 1);
@@ -11,7 +14,7 @@ function [spot, m] = gtGetRawRoi(start_image, end_image, acq, bb)
     % was < acq.xdet and < acq.ydet
     if all([bb(1) > 0, bb(2) > 0, bb(1)+bb(3) <= acq.xdet, bb(2)+bb(4) <= acq.ydet])
         fullImgsDir = fullfile(acq.dir, '1_preprocessing', 'full');
-        indexes = start_image : end_image;
+        indexes = mod(start_image : end_image, tot_images);
         filename = fullfile(fullImgsDir, sprintf('full%04d.edf', indexes(1)));
         info     = edf_info(filename);