As the topic says, when the code runs out of images, there is no use to start repeating the last slice. Some example images showing this artifact: <img width="942" alt="Screenshot 2022-08-08 at 13 17 57" src="https://user-images.githubusercontent.com/62022662/185069725-2affa8db-1c63-46dc-a914-699ede420921.png"> <img width="575" alt="Screenshot 2022-08-17 at 10 03 04" src="https://user-images.githubusercontent.com/62022662/185069759-2f81bc9e-b8c4-4e23-9059-1c3d2225cb7d.png">